Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: improve the accuracy of docs/improve docs #4845

Merged
merged 6 commits into from
Oct 17, 2020

Conversation

NotSugden
Copy link
Contributor

@NotSugden NotSugden commented Sep 23, 2020

Please describe the changes this PR makes and why it should be merged:
This PR changes some code to

  • match the documentation, some properties are typed as ?Type which indicates nullable but were being set to undefined, they are now set to null
    • this also just changes some code in general to prefer null over undefined
  • correctly types some properties as nullable (such as Guild#voice)
  • removes unnessercary @name tags from certian declarations, they are only needed if the typedef is not directly above the actual declaration
  • changes a couple of @prop tags to @property for consistency
  • changes some classes to have an @abstract tag on them, as they are abstract classes

this PR is a breaking change

Status

  • Code changes have been tested against the Discord API, or there are no code changes
    • not fully tested if null causes any internal problems with the library (eg `typeof x === 'undefined'), will get round to it
  • I know how to update typings and have done so, or typings don't need updating

Semantic versioning classification:

  • This PR changes the library's interface (methods or parameters added)
    • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
  • This PR only includes non-code changes, like changes to documentation, README, etc.

* prefer null over undefined
* remove unnessercary @name tags
* better defaults
src/structures/Guild.js Show resolved Hide resolved
src/structures/Guild.js Show resolved Hide resolved
src/sharding/Shard.js Show resolved Hide resolved
src/structures/GuildAuditLogs.js Show resolved Hide resolved
@kyranet kyranet requested review from vladfrangu and iCrawl October 12, 2020 19:56
@iCrawl iCrawl merged commit af670fc into discordjs:master Oct 17, 2020
GiorgioBrux pushed a commit to GiorgioBrux/discord.js that referenced this pull request Oct 17, 2020
@NotSugden NotSugden deleted the fix-types-docs branch July 28, 2021 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants